<%-- 
    Document   : productdetail
    Created on : Oct 31, 2013, 8:29:30 PM
    Author     : Mr.T
--%>
<%@page import="mysql.DataProvider"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="mysql.MySQLConnect" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<% 
    MySQLConnect conn = new MySQLConnect();
    ResultSet rs;
%>
<!DOCTYPE html>
<html lang="en">
    <head>

        <!-- start: Meta -->
        <meta charset="utf-8">
        <title>Beautiful Deal</title>
        <meta name="description" content="Beautiful Deal Bootstrap Admin Template.">
        <meta name="author" content="Łukasz Holeczek">
        <!-- end: Meta -->

        <!-- start: Mobile Specific -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <!-- end: Mobile Specific -->

        <!-- start: CSS -->
        <link href="../template/css/bootstrap-combined.min.css" rel="stylesheet">
        <link id="bootstrap-style" href="../template/css/bootstrap.min.css" rel="stylesheet">
        <link href="../template/css/bootstrap-responsive.min.css" rel="stylesheet">
        <link href="../template/css/mystyle.css" rel="stylesheet">
        <link id="base-style" href="../template/css/style.css" rel="stylesheet">
        <link id="base-style-responsive" href="../template/css/style-responsive.css" rel="stylesheet">

        <!--[if lt IE 7 ]>
        <link id="ie-style" href="../template/css/style-ie.css" rel="stylesheet">
        <![endif]-->
        <!--[if IE 8 ]>
        <link id="ie-style" href="../template/css/style-ie.css" rel="stylesheet">
        <![endif]-->
        <!--[if IE 9 ]>
        <![endif]-->

        <!-- end: CSS -->


        <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
        <![endif]-->

        <!-- start: Favicon -->
        <link rel="shortcut icon" href="img/favicon.ico">
        <!-- end: Favicon -->




    </head>

    <body>
        <div id="overlay">
            <ul>
                <li class="li1"></li>
                <li class="li2"></li>
                <li class="li3"></li>
                <li class="li4"></li>
                <li class="li5"></li>
                <li class="li6"></li>
            </ul>
        </div>	
        <!-- start: Header -->
        <div class="navbar">
            <div class="navbar-inner">
                <div class="container-fluid">
                    <a class="btn btn-navbar" data-toggle="collapse" data-target=".top-nav.nav-collapse,.sidebar-nav.nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </a>
                    <a class="brand" href="../page/index.jsp"> <img alt="Beautiful Deal" src="../template/img/logo20.png" /> <span class="hidden-phone">Beautiful Deal</span></a>

                    <!-- start: Header Menu -->
                    <div class="nav-no-collapse header-nav">
                        <ul class="nav pull-right">

                            <li>
                                <form class="frm_search" method="post" name="frm_search" >
                                    <input type="text" name="keyword" value="Tìm Deals" class="inputSearch" id="inputSearch" autocomplete="off" onfocus="if (this.value == this.title)
                                                                            this.value = '';" onblur="if (this.value == '')
                                                                                        this.value = this.title;" title="Tìm Deals">
                                    <input type="submit" class="btnsearch" value="" onclick="">
                                    <div class="c"></div>
                                </form>
                            </li>
                            <!-- start: User Dropdown -->
                            <li class="dropdown">
                                <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
                                    <i class="icon-user icon-white"></i>
                                    <span class="caret"></span>
                                </a>
                                <ul class="dropdown-menu">
                                    <li><a href="#"><i class="icon-user"></i> Profile</a></li>
                                    <li><a href="../page/login.jsp"><i class="icon-off"></i> Logout</a></li>
                                </ul>
                            </li>
                            <!-- end: User Dropdown -->
                        </ul>
                    </div>
                    <!-- end: Header Menu -->

                </div>
            </div> 
        </div>
        <!-- start: Header -->

        <div class="container-fluid">
            <div class="row-fluid">

                <!-- start: Main Menu -->
                <div class="span2 main-menu-span">
                    <div class="nav-collapse sidebar-nav">
                        <ul class="nav nav-tabs nav-stacked main-menu">
                            <li><a href="../page/index.jsp"><i class="icon-home icon-white"></i><span class="hidden-tablet"> TRANG CHỦ </span></a></li>
                            <li><a href="../page/dealmoi.jsp"><i class="icon-eye-open icon-white"></i><span class="hidden-tablet"> DEAL MỚI HÔM NAY </span></a></li>
                            <li><a href="../page/anuong.jsp"><i class="icon-edit icon-white"></i><span class="hidden-tablet"> ĂN UỐNG</span></a></li>
                            <li><a href="../page/mypham.jsp"><i class="icon-list-alt icon-white"></i><span class="hidden-tablet"> MỸ PHẨM</span></a></li>
                            <li>
                                <a class="dropmenu" href="#"><i class="fa-icon-folder-close-alt"></i><span class="hidden-tablet"> THỜI TRANG</span></a>
                                <ul>
                                    <li><a class="submenu" href="../page/thoitrangnam.jsp"><i class="fa-icon-file-alt"></i><span class="hidden-tablet">THỜI TRANG NAM</span></a></li>
                                    <li><a class="submenu" href="../page/thoitrangnu.jsp"><i class="fa-icon-file-alt"></i><span class="hidden-tablet">THỜI TRANG NỮ</span></a></li>
                                    <li><a class="submenu" href="../page/giaydep.jsp"><i class="fa-icon-file-alt"></i><span class="hidden-tablet">GIÀY DÉP</span></a></li>
                                </ul>	
                            </li>
                            <li><a href="../page/giaitri.jsp"><i class="icon-font icon-white"></i><span class="hidden-tablet"> GIẢI TRÍ</span></a></li>
                            <li><a href="../page/dulich.jsp"><i class="icon-picture icon-white"></i><span class="hidden-tablet"> DU LỊCH</span></a></li>
                            <li><a href="../page/kythuatso.jsp"><i class="icon-align-justify icon-white"></i><span class="hidden-tablet"> KỸ THUẬT SỐ</span></a></li>
                            <li><a href="../page/hanggiadung.jsp"><i class="icon-calendar icon-white"></i><span class="hidden-tablet"> HÀNG GIA DỤNG</span></a></li>
                            <li><a href="../page/spa.jsp"><i class="icon-th icon-white"></i><span class="hidden-tablet"> SPA & LÀM ĐẸP</span></a></li>
                            <li><a href="../page/lienhe.jsp"><i class="icon-folder-open icon-white"></i><span class="hidden-tablet"> LIÊN HỆ</span></a></li>
                            <li><a href="../page/quanly.jsp"><i class="icon-star icon-white"></i><span class="hidden-tablet"> QUẢN LÝ</span></a></li>
                            <li><a href="../page/login.jsp"><i class="icon-lock icon-white"></i><span class="hidden-tablet"> ĐĂNG NHẬP</span></a></li>
                        </ul>
                    </div><!--/.well -->
                </div><!--/span-->
                <!-- end: Main Menu -->

                <noscript>
                <div class="alert alert-block span10">
                    <h4 class="alert-heading">Warning!</h4>
                    <p>You need to have <a href="http://en.wikipedia.org/wiki/JavaScript" target="_blank">JavaScript</a> enabled to use this site.</p>
                </div>
                </noscript>

                <div id="content" class="span10">
                    <!-- start: Content -->

                    <div>
                        <hr>
                        <ul class="breadcrumb">
                            <li>
                                <a href="../page/index.jsp">Trang Chủ</a> <span class="divider">/</span>
                            </li>
                            <li>
                                <a href="#">...</a>
                            </li>
                        </ul>
                        <hr>
                    </div>
                    <%
                        String category=request.getParameter("category");
                        
                    %>
                    <div id="feature_product" class="feature_product">
                        <% 
                            rs = DataProvider.loadCategory(category);
                            if(rs.next()){
                        %>
                        <h2 class=""><%= rs.getString("TenLoai") %></h2>
                        
                        <% 
                            }else{
                        %>
                        
                        <h2 class="">UNKNOW</h2>
                        
                        <% 
                            }
                        %>
                        <div id="AjaxProduct" totalPage="<%= DataProvider.getTotalPage(category)%>">
                            <!-- code product here -->

                            <%
                                rs = DataProvider.loadProductByCategory(category,1);
                                int i=0;
                                if(rs!=null){
                                    while (rs.next()) {
                                        if(i==0)
                                            out.write("<div class='row-fluid row-product'>");
                            %>
                            <div class="list-rands-over span3">
                                <div class="list-rands">
                                    <div class="box-frame-center">
                                        <div lang="41657" class="v6ItemHotImg v7Relative">

                                            <a href="#">
                                                <div class="v7price_promotion fixPNG"><%= DataProvider.getDiscout(rs.getString("GiaGoc"), rs.getString("GiaBan")) %><span>%</span></div>
                                                <img width="290" height="290" alt="Son Naris White" src="../template/img/test.jpg">
                                            </a>
                                            <div class="v7InfoType">
                                                <div class="c"></div>
                                            </div>
                                        </div> 
                                        <div class="v6ContentHot">
                                            <div align="left" class="titledeals2">
                                                <a href="#" title="Xem chi tiết deal"><%= rs.getString("TenSP") %></a> 
                                            </div>
                                        </div>
                                        <div class="v6TopBorder fixPNG">
                                            <div class="fl v7prices mTop3">
                                                <div class="v7PromotionBigSold"><%= rs.getString("GiaBan") %><span>đ</span></div>
                                                <div class="v7bnew mTop10">Đã mua: <b>226</b></div>
                                            </div>
                                            <a href="#" class="v7view fr fixPNG mTop20"><img width="61" height="30" src="../template/img/blank.gif"></a>
                                            <div class="c"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <%
                                        i++;
                                        if(i>3){
                                            out.write("</div><!--/fluid-row row-product-->");
                                            i=0;
                                        }
                                }
                                // dong div cuoi cung
                                    if(i>0 && i < 4)
                                        out.write("</div><!--/fluid-row row-product-->");
                                }else{
                                    out.write("<div class='row-fluid row-product'>");
                                    out.write("<small>Chưa có dữ liệu</small>");
                                    out.write("</div><!--/fluid-row row-product-->");
                                }
                            %>
                        </div>
                    </div>
                    <div id="Paging" class="fluid-row">

                    </div>
                    

                    <!-- end: Content -->

                </div><!--/#content.span10-->


                <div class="modal hide fade" id="myModal">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal">×</button>
                        <h3>Settings</h3>
                    </div>
                    <div class="modal-body">
                        <p>Here settings can be configured...</p>
                    </div>
                    <div class="modal-footer">
                        <a href="#" class="btn" data-dismiss="modal">Close</a>
                        <a href="#" class="btn btn-primary">Save changes</a>
                    </div>
                </div>

                <div class="clearfix"></div>

                <footer>
                    <p>
                        <span style="text-align:left;float:left">&copy; <a href="http://clabs.co" target="_blank">creativeLabs</a> 2013</span>
                        <span style="text-align:right;float:right">Powered by: <a href="#">Beautiful Deal</a></span>
                    </p>

                </footer>

            </div><!--/.fluid-container-->

            <!-- start: JavaScript-->

            <script src="../template/js/jquery-1.9.1.min.js"></script>

            <script src="../template/js/jquery-migrate-1.0.0.min.js"></script>

            <script src="../template/js/jquery-ui-1.10.0.custom.min.js"></script>

            <script src="../template/js/jquery.ui.touch-punch.js"></script>

            <script src="../template/js/bootstrap.min.js"></script>

            <script src="../template/js/jquery.cookie.js"></script>

            <script src="../template/js/fullcalendar.min.js"></script>

            <script src="../template/js/jquery.dataTables.min.js"></script>

            <script src="../template/js/excanvas.js"></script>

            <script src="../template/js/jquery.flot.min.js"></script>

            <script src="../template/js/jquery.flot.pie.min.js"></script>

            <script src="../template/js/jquery.flot.stack.js"></script>

            <script src="../template/js/jquery.flot.resize.min.js"></script>

            <script src="../template/js/jquery.chosen.min.js"></script>

            <script src="../template/js/jquery.uniform.min.js"></script>

            <script src="../template/js/jquery.cleditor.min.js"></script>

            <script src="../template/js/jquery.noty.js"></script>

            <script src="../template/js/jquery.elfinder.min.js"></script>

            <script src="../template/js/jquery.raty.min.js"></script>

            <script src="../template/js/jquery.iphone.toggle.js"></script>

            <script src="../template/js/jquery.uploadify-3.1.min.js"></script>

            <script src="../template/js/jquery.gritter.min.js"></script>

            <script src="../template/js/jquery.imagesloaded.js"></script>

            <script src="../template/js/jquery.masonry.min.js"></script>

            <script src="../template/js/jquery.knob.js"></script>

            <script src="../template/js/jquery.sparkline.min.js"></script>
            
            <script src="../template/js/bootstrap-paginator.js"></script>

            <script src="../template/js/custom.js"></script>
            <script src="../template/js/ajaxALL.js"></script>
            <!-- end: JavaScript-->

    </body>
</html>
